home *** CD-ROM | disk | FTP | other *** search
/ PC World Interactive 9 / PC World Interactive 9 - Temmuz 1998.iso / muzik / FMSYNTH.EXE / SYSEX.TXT < prev    next >
Text File  |  1994-03-19  |  10KB  |  247 lines

  1. FM Midi Synth driver Version 2.0
  2. Copyright (c) 1993 by Jamie O'Connell
  3.  
  4. System Exclusive Information
  5.  
  6. The FM Synth driver is a bi-directional driver: it provides
  7. a MIDI input port in order to implement System Exclusive
  8. dumps.  The driver can send or receive System Exclusive data
  9. and recieve commands.  The general format of a SysEx message
  10. is as follows:
  11.  
  12.      F0          MIDI Sys Ex
  13.      00,00, 5B  Manufacturers' ID: WinJammer Software Ltd.
  14.      7F          Device ID -- Must be present
  15.      01          Model ID -- FM Synth Driver
  16.      xx          Command ID -- See Below
  17.      aa          Address MSB -- Location: Bank#,
  18.                 Percussion or System
  19.      aa          Address LSB -- Timbre# or Parameter
  20.      ss          Size MSB of following Data Block or
  21.                  #Bytes to dump
  22.      ss          Size LSB
  23.      data        Data if send request, otherwise blank
  24.      F7          End of Exclusive Command
  25.  
  26. Command ID
  27.  
  28.      Code     Meaning
  29.      (Hex)
  30.      11       Request Data from Driver
  31.      12       Send Data to the Driver, Send Data
  32.               to the Application
  33.      15       Reset Driver to Power-on state
  34.      16       Reset Timbre Banks
  35.      
  36. In order to receive system exclusive dumps from the driver,
  37. the FM Synth SysEx Input driver must be attached to an
  38. application input port.  It is then a simple matter of
  39. sending the desired starting address, and a size describing
  40. the amount of data to dump.  The data received from the
  41. driver contains a command id of 12 hex, so that the data is in
  42. the proper format to be shipped back to the driver at any
  43. time.
  44.  
  45. The Reset Timbre Bank message and the Reset Driver message
  46. contain only a single Command ID code -- no address or size
  47. bytes.
  48.  
  49. Address Bytes
  50.  
  51. The address bytes, together determine where data will be
  52. stored.  See below for specific locations.
  53.  
  54. Size Bytes
  55.  
  56. The total size of the data block is determined by combining
  57. the size bytes (7 bits of each).  Data is stored or dumped
  58. consecutively in Address order -- this means that you can
  59. fill or dump the entire contents of the driver with one data
  60. block.
  61.  
  62. Timbre Banks
  63.  
  64. Individual timbres or entire banks may be uploaded to the
  65. driver.  The new timbre parameters remain until the driver is
  66. reset.  You can send the sysex block as if the Banks and
  67. timbres were stored consecutively.  Individual parameters
  68. can be written to by placing a value in the address offset
  69. (LSB).  The new timbre will not take effect until a program
  70. change is made to access the timbre.
  71.  
  72. Address Map
  73.  
  74. Addr     Addr     Description
  75. MSB      LSB
  76. 00       00       Bank 0, Timbre 0 -- this refers to the
  77.                   first timbre in the first bank -- each
  78.                   timbre is 24 bytes long (see below for
  79.                   format)
  80. 00       01       This refers to the second timbre in the
  81.                   first bank
  82. ...      ...      ... The rest of the bank
  83. 00       7F       The last timbre in the first bank
  84. 01       00       The first timbre in the second bank
  85. ...      ...      ... The remaining timbres
  86. 04       7F       The last timbre in the fifth bank
  87.                   
  88.                   Percussion Parameters
  89. 10       00       First Percussion timbre
  90. 10       2E       Last Percussion timbre (0-46)
  91. 11       00       Percussion Map -- Size: 94 bytes (See
  92.                   Below)
  93.                   *Version 2.0 Percussion Bank*
  94. 12       00       First Percussion timbre  
  95. 12       7F       Last Percussion timbre 
  96.                
  97.                   System Parameters
  98. 20       00       Location of the System Parameters --
  99.                   Size: 36 Bytes 
  100. 22       00       Location of the System Parameters --
  101.                   Size: 37 Bytes (See Below)
  102.  
  103.    
  104. Timbre Exclusive Format
  105.  
  106. Offset  Description              Allowed Values
  107.  
  108. 00    Modulator Attack Rate    0 - 15 higher is faster
  109. 01    Modulator Decay Rate     0-15
  110. 02    Modulator Sustain Rate   0-15
  111. 03    Modulator Release Rate   0-15
  112. 04    Modulator                4 lower bits indicating on
  113.       Trem,Vib,EnvScale,KSR    or off:
  114.                                |...|AM|VIB|EGT|KSR|
  115. 05    Modulator Frequency      0-15 (0 = 1/2)
  116.       Multiplier
  117. 06    Modulator KSL            KSL: 0-3
  118. 07    Modulator Output Level   0-63 zero is loudest
  119.       (attenuation)
  120. 08    Modulator Wave Form      Wave: 0-7 (0-3 on OPL2)
  121. 09    Modulator Feedback, Op   |...|F|F|F|C| - FB: 0-7,
  122.       Connection               FM: 0, Add Syn: 1
  123. 10    Carrier Attack Rate      0 - 15 higher is faster
  124. 11    Carrier Decay Rate       0-15
  125. 12    Carrier Sustain Rate     0-15
  126. 13    Carrier Release Rate     0-15
  127. 14    Carrier                  4 lower bits indicating on
  128.       Trem,Vib,EnvScale,KSR    or off:
  129.                                |...|AM|VIB|EGT|KSR|
  130. 15    Carrier Frequency        0-15 (0 = 1/2)
  131.       Multiplier
  132. 16    Carrier KSL              KSL: 0-3
  133. 17    Carrier Output Level     0-63 zero is loudest
  134.       (attenuation)
  135. 18    Carrier Wave Form        Wave: 0-7 (0-3 on OPL2)
  136. 19    Percussion Voice#        Used for Percussion
  137.                                patches: 6=BD, 7=SD,
  138.                                8=TT, 9=CYM, 10=HH
  139. 20    Transposition Offset     |...|S|TTTTTT| S=0 pos,1
  140.                                neg;Trans: 0-63
  141. 21    Percussion Pitch         *New for Version 2.0*
  142. 22    Reserved                 Set to 0 -- Future Use
  143. 23    Reserved                 Set to 0 -- Future Use
  144.  
  145. Each timbre is 24 bytes long.  Each bank holds 128 timbres.
  146. There are 3,072 bytes in an entire Bank message (plus
  147. header).  All five banks can be filled by one 15,360 byte
  148. message (plus header).
  149.  
  150. Percussion Timbres
  151.  
  152. Version 2.0 of the FM Synth driver adds percussion bank 
  153. loading.  The driver System Exclusive codes are backwardly
  154. compatible with previous versions.  In addition a new 
  155. address is available to Transmit and Receive the entire
  156. 128 note percussion bank.  The ALL dump continues to
  157. dump the percussion bank as listed below, but you can
  158. retrieve and set the full percussion bank by using address
  159. 12 Hex.
  160.  
  161. General MIDI defines 47 drum notes, and the driver has
  162. storage for 47 drum timbres (128 for version 2.0).  
  163. The percussion timbres use the percussion voice# parameter 
  164. to decide which of the 5 drum voices to sound for the drum 
  165. tone.  In addition a percussion mapping of Key to Timbre is 
  166. implemented, and may be dumped and loaded.  There are 47 slots 
  167. in the percussion map, which cover MIDI notes 35 to 81 (in other 
  168. words, array element 0 corresponds to MIDI note 35).  Each slot 
  169. is 2 bytes, so the map is 94 byes long:
  170.  
  171.               Percussion Map Slot
  172.      Offset   Meaning
  173.      01       Timbre number to sound (0-46)
  174.      02       MIDI Note to play for the key
  175.               (60 = Middle C)
  176.  
  177. The above map is not required for the Version 2.0 percussion bank,
  178. as all the parameters are contained within the timbre specification.  
  179. For compatibility, it will still be dumped and received, however.
  180.  
  181. System Parameters Exclusive Format
  182.  
  183. Certain driver configuration parameters may be sent to or
  184. received from the driver.  Following is the format for the
  185. system parameter dump and load.  The address to use for
  186. system parameters is 22 hex for version 2.00 (version 1.x 
  187. used 20 hex):
  188.  
  189. Offset  Description            Allowed Values
  190.  
  191. 00    Stereo Mode              0 = Mono, 1 = Stereo
  192. 01    Percussion Mode          0 = Off, 1 = On
  193. 02    Percussion Channel       if Percussion mode = 1:
  194.                                channel = 0-15 (i.e. MIDI
  195.                                channel 10 is value 9)
  196. 03    Default Bank             0-4 (Bank1 - Bank5)
  197. 04    Vibrato Depth            0 = light, 1 = deep
  198. 05    Tremolo Depth            0 = light, 1 = deep
  199. 06    Bend Range               0-12 semitones (1 octave)
  200. 07    Save these settings      1 = Save the settings in
  201.                                the INI file
  202. 08    Channel 0 -- MIDI        0 = Off, 1 = On
  203.       Channel Map
  204. :     :                        The channel map specifies
  205. :     :                        which channels to receive
  206.                                on and play.
  207. 23    Channel 15               0 = Off, 1 = On
  208.  
  209. For Version 2.0 a new address is supplied: 22 Hex.  This address
  210. will transmit and receive all of the above parameters plus the
  211. new Percussion Boost:
  212.  
  213. 24    Percussion Boost         64 is the mid point (no Boost)
  214.                                65 - 127 is positive boost, 63 - 0
  215.                                is negative boost (attenuation).
  216.  
  217. Examples
  218.  
  219. The following message will send a timbre to the first bank,
  220. timbre slot 12 (Vibraphone).  All numbers are in
  221. hexadecimal:
  222.  
  223.      F0, 00, 00, 5B, 7F, 01, 12 Header & Send Request
  224.      00, 0B, 00, 28            Bank#1,Timbre#12, Size: 40
  225.      0F, 0B, 0C, 01, 06, 03,     Data: Operator
  226.      01, 01, 03, 07              Parameters
  227.      0D, 0A, 0C, 02, 07, 02, 
  228.      01, 03, 02, 00
  229.      1F, 2A, 0B, 00, 06, 03,     Data: 2nd Timbre
  230.      01, 02, 02, 05              Operator Parameters
  231.      03, 0D, 0C, 01, 06, 00, 
  232.      00, 03, 03, 00
  233.      F7                        End of Exclusive
  234.      
  235. This message requests the driver to send timbre#13, 14, and
  236. 15 from the 2nd Bank:
  237.  
  238.      F0, 00, 00, 5B,        Header & Dump
  239.      7F, 01, 11,              Request
  240.      01, 0C, 00, 3C, F7       Bank#2, Timbre#14, Size: 60
  241.  
  242. The next message requests the driver to reset all the patch
  243. banks to the startup state:
  244.  
  245.      F0, 00, 00, 5B,      Header & Reset
  246.      7F, 01, 16, F7       Request
  247.